//AbstractTest.java
package com.ylaihui.oop11;

abstract class Creature{
	public abstract void breath();
}

abstract class Person extends Creature{
	String name;
	int age;
	
	Person(){}
	Person(String name, int age){
		this.name = name;
		this.age = age;
	}
	public abstract void eat();
}

class Student extends Person{
	String major;

	Student(){}
	Student(String name, int age, String major){
		super(name,age);
		this.major = major;
	}
	
	public void eat() {
		System.out.println("Student eat()...");
	}

	public void breath() {
		System.out.println("Student breath()...");
	}
	
}

public class AbstractTest {
	// Cannot instantiate the type Person
//	Person p = new Person();
	
	Student s = new Student();
	
}
